 class Tendril extends com.Node {
	public static TYPE_WITHOUT_SPOT:number;
	public static TYPE_WITH_SPOT:number;
	private _SafeStr_282:number = 1;
	private _SafeStr_283:number = 0;
	private _SafeStr_95:number = 0;
	private _sync:Sync = null;
	private _SafeStr_118:number = 0xFFFFFF;
	private _SafeStr_274:number = 0;
	private _SafeStr_284:number = 0;
	private _SafeStr_285:boolean = false;

	public constructor(_arg_1:number,baseRadius:number,angle:number,size:number,moveSize:number,moveOffset:number = 0,moveDir:boolean = false,sync:Sync = null)
	{
		super(baseRadius,angle);
		this._sync = ((sync != null)?sync:new Sync(0.2));
		this._SafeStr_285 = ((sync == null)?true:false);
		this._SafeStr_95 = _arg_1;
		this._SafeStr_274 = size;
		this._SafeStr_283 = moveSize;
		this._SafeStr_284 = moveOffset;
		this._SafeStr_282 = ((moveDir)?1:-1);
	}

	public setColor(color:number)
	{

		this._SafeStr_118 = (color);
	}

	public setSize(size:number)
	{
		this._SafeStr_274 = size;
	}

	private draw()
	{	
		let shape=new egret.Shape();
		var g:egret.Graphics = this.graphics;
		var centerRadius:number = (this._baseRadius + (this._SafeStr_274 / 2));
		var endRadius:number = (this._baseRadius + this._SafeStr_274);
		var endAngle:number = (this._baseAngle + ((this._SafeStr_282 * this._SafeStr_283) * (Math.sin(this._sync.phase) - this._SafeStr_284)));
		var beginX:number = (Math.cos(this._baseAngle) * this._baseRadius);
		var beginY:number = (Math.sin(this._baseAngle) * this._baseRadius);
		var midX:number = (Math.cos(this._baseAngle) * centerRadius);
		var midY:number = (Math.sin(this._baseAngle) * centerRadius);
		var endX:number = (Math.cos(endAngle) * endRadius);
		var endY:number = (Math.sin(endAngle) * endRadius);
		g.clear();
		g.lineStyle(1,GUI.OUTLINE_COLOR);
		g.moveTo(beginX,beginY);
		g.curveTo(midX,midY,endX,endY);
		if(this._SafeStr_95 == Tendril.TYPE_WITH_SPOT)
		{
			g.lineStyle(1,GUI.OUTLINE_COLOR);
			g.beginFill(this._SafeStr_118);
			g.drawCircle(endX,endY,3);
			g.endFill();
		}
	}

	protected onEnterFrame(event:egret.Event)
	{
		if(this._SafeStr_285)
		{
			this._sync.tick();
		}
		this.draw();
	}

	public destruct()
	{
		super.destruct();
	}

}

Tendril.TYPE_WITHOUT_SPOT = 0;
Tendril.TYPE_WITH_SPOT = 1;

